package org.bigjava.travel.service;

import org.bigjava.travel.bean.Message;
import org.bigjava.travel.utils.PageParam;

import java.util.List;

/**
 * 留言的业务逻辑层<接口>
 */

public interface MessageService {

    public long count()throws Exception;

    public long countByUserId(Integer userId)throws Exception;

    public Message findById(Integer id)throws Exception;

    public List<Message> findList()throws Exception;

    public void save(Message message)throws Exception;

    public void update(Message message)throws Exception;

    public void deleteById(Integer id)throws Exception;

    public List<Message> findByPage(int currentPage, int pageSize, String query)throws Exception;

    public PageParam<Message> findByPageByUserId(int currentPage, int pageSize, Integer userId)throws Exception;
}
